<?php

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;

/* @var $this yii\web\View */
/* @var $model backend\models\CustomerContact */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="customer-contact-form">

    <?php $form = ActiveForm::begin(['layout' => 'horizontal', 'options' => ['enctype' => 'multipart/form-data']]); ?>

    <?= $form->field($model, 'contact')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'post')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'mobile')->textInput(['maxlength' => true]) ?>
    
    <div class="row">
        <div class="col-sm-offset-3 col-sm-8">
            <?= Html::img($model->image, ['width' => '300px']) ?>
        </div>
    </div>
    <?= $form->field($model, 'image')->fileInput() ?>
    <div class="row">
        <div class="col-sm-8 col-sm-offset-3">
            <div class="form-group">
                <?= Html::submitButton($model->isNewRecord ? '创建' : '更新', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
            </div>
        </div>
    </div>

    <?php ActiveForm::end(); ?>

</div>
